
//点赞 	
let zans=document.querySelectorAll('.zan')
console.log(zans)
let pcomments = document.querySelectorAll('.pcomment')
console.log(pcomments)
let p=document.querySelectorAll('.num')
console.log(p)
// console.log(p.value)
let count = 1;
for(let i=0;i<zans.length;i++){
	zans[i].onclick = function(){
		if(this.style.color == 'red'){
			this.style.color = 'black';
			this.nextElementSibling.innerHTML = parseInt(this.nextElementSibling.innerHTML)-1
		}else{
			this.style.color = 'red';
			this.nextElementSibling.innerHTML = parseInt(this.nextElementSibling.innerHTML)+1
		}
	}
	
}

	
	//导航切换			
	let FtNavLis=document.querySelectorAll('.FT-mainNav li')
	let FTcontents = document.querySelectorAll('.FT-main')
	console.log(FTcontents,FtNavLis)
	console.log(FTcontents[2])
	for(let i=0;i<FtNavLis.length;i++){
		console.log(i)
		FtNavLis[i].onclick=function(){
			console.log(i)
			for(let j=0;j<FTcontents.length;j++){
				FTcontents[j].style.display="none"
				FtNavLis[j].className=""
			}
			FTcontents[i].style.display="block"
			FtNavLis[i].className="active"
		}
	}
	//时尚轮播
	var swiper = new Swiper('.swiper-container', {
	  spaceBetween: 30,
	  effect: 'fade',
	  loop:true,
	  pagination: {
	    el: '.swiper-pagination',
	    clickable: true,
		bulletElement:'li',
		bulletActiveClass:'my-bullet-active',
	  },
	  navigation: {
	    nextEl: '.swiper-button-next',
	    prevEl: '.swiper-button-prev',
	  },
	   autoplay:{
		   delay:800,
	   }
	});
		